import type { MenuRaw } from '@/types/sys/menu';
import { defineStore } from 'pinia';

export const usePermissionStore = defineStore('permission', () => {
  const addRoutes = ref<MenuRaw[]>([]);

  const getRoutes = async () => {
    const res = await getRoutesApi();
    addRoutes.value = res;
    return res;
  };

  return { addRoutes, getRoutes };
});
